<!--{$fsc->query}-->

{if condition="$fsc->get_errors()"}
<div class="alert alert-danger">
   <ul>{loop="$fsc->get_errors()"}<li>{$value}</li>{/loop}</ul>
</div>
{/if}
{if condition="$fsc->get_messages()"}
<div class="alert alert-info">
   <ul>{loop="$fsc->get_messages()"}<li>{$value}</li>{/loop}</ul>
</div>
{/if}

<div class="table-responsive">
   <table class="table table-hover">
      <thead>
         <tr>
            <th class="text-left">Código</th>
            <th class="text-left">Descripción</th>
            <th class="text-right">Debe</th>
            <th class="text-right">Haber</th>
            <th class="text-right">Saldo</th>
         </tr>
      </thead>
      {loop="$fsc->resultados"}
      <tr>
         <td>
            <a href="#" onclick="select_subcuenta('{$value->codsubcuenta}','{$value->saldo}')">
               {$value->codsubcuenta}
            </a>
         </td>
         <td>
            <a href="#" onclick="select_subcuenta('{$value->codsubcuenta}','{$value->saldo}')">
               {$value->descripcion}
            </a>
         </td>
         <td class="text-right">{$fsc->show_precio($value->debe, $value->coddivisa)}</td>
         <td class="text-right">{$fsc->show_precio($value->haber, $value->coddivisa)}</td>
         <td class="text-right">{$fsc->show_precio($value->saldo, $value->coddivisa)}</td>
      </tr>
      {else}
      <tr class="bg-warning">
         <td colspan="5">Sin resultados en el ejercicio.</td>
      </tr>
      {/loop}
   </table>
</div>